from typing import *


class Solution:

    def oddString(self, words: List[str]) -> str:

        def f(word: str):
            ls = []
            for i in range(1, len(word)):
                ls.append(ord(word[i]) - ord(word[i - 1]))
            return tuple(ls)

        ls = []
        for word in words:
            ls.append(f(word))

        counter = Counter(ls)
        find = None
        for k, v in counter.items():
            if v == 1:
                find = k
        for k, v in zip(ls, words):
            if k == find:
                return v


class Solution:

    def oddString(self, words: List[str]) -> str:

        def f(word: str):
            ls = []
            for i in range(1, len(word)):
                ls.append(ord(word[i]) - ord(word[i - 1]))
            return tuple(ls)

        v0 = f(words[0])
        v1 = f(words[1])
        if v0 == v1:
            for i in range(2, len(words)):
                if f(words[i]) != v0:
                    return words[i]
        return words[0] if f(words[2]) == v1 else words[1]


s = Solution()
print(s.oddString(words=["adc", "wzy", "abc"]))
# print(ord("a"))

print(tuple("abc"))